﻿using MgSoft.Excel.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace MgSoft.Excel.Util
{
    public static class CellDataTypeUtil
    {
        public static string GetDataTypeCaption(CellDataType cellDataType)
        {
            string result;
            switch(cellDataType)
            {
                case CellDataType.String:
                    result= "字符";break;
                case CellDataType.Int:
                    result= "整数";break;
                case CellDataType.Double:
                    result = "数字";break;
                case CellDataType.Date:
                    result = "日期";break;
                case CellDataType.Decimal:
                    result= "小数";break;
                case CellDataType.NullableInt:
                    result = "可空整数";break;
                case CellDataType.NullableDate:
                    result = "可空日期";break;
                case CellDataType.NullableDouble:
                    result = "可空数字"; break;
                case CellDataType.NullableDecimal:
                    result = "可空小数"; break;
                default:
                    result = "未知";break;
            }
            return result;
        }
    }
}
